<?php
require_once "Config/config.php";
$connect = mysql_connect(DB_HOST . ":" . DB_PORT, DB_USER,DB_PASS, DB_NAME);
mysql_select_db('web1', $connect);

function getFilms($query) {
    global $connect;
    $pages = array();
    //
    $datat = mysql_query($query, $connect);
    while ($rowa = mysql_fetch_assoc($datat)) {
        $pages[] = $rowa;
    }
    //
    return $pages;
}
?>